package com.his.bean;

import java.io.Serializable;

/**
 * 短信发送记录表
 * @TableName dzm_his_sms_log
 */
public class DzmHisSmsLog implements Serializable {
    /**
     * 表id
     */
    private Integer id;

    /**
     * 手机号
     */
    private String mobile;

    /**
     * 发送时间
     */
    private Integer addTime;

    /**
     * 验证码
     */
    private String code;

    /**
     * 1.发送成功2发送失败
     */
    private Short status;

    /**
     * 1注册验证码，2，其他
     */
    private Byte type;

    /**
     * 发送失败的错误信息
     */
    private String errorInfo;

    private static final long serialVersionUID = 1L;

    /**
     * 表id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 表id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 手机号
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * 手机号
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /**
     * 发送时间
     */
    public Integer getAddTime() {
        return addTime;
    }

    /**
     * 发送时间
     */
    public void setAddTime(Integer addTime) {
        this.addTime = addTime;
    }

    /**
     * 验证码
     */
    public String getCode() {
        return code;
    }

    /**
     * 验证码
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * 1.发送成功2发送失败
     */
    public Short getStatus() {
        return status;
    }

    /**
     * 1.发送成功2发送失败
     */
    public void setStatus(Short status) {
        this.status = status;
    }

    /**
     * 1注册验证码，2，其他
     */
    public Byte getType() {
        return type;
    }

    /**
     * 1注册验证码，2，其他
     */
    public void setType(Byte type) {
        this.type = type;
    }

    /**
     * 发送失败的错误信息
     */
    public String getErrorInfo() {
        return errorInfo;
    }

    /**
     * 发送失败的错误信息
     */
    public void setErrorInfo(String errorInfo) {
        this.errorInfo = errorInfo;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DzmHisSmsLog other = (DzmHisSmsLog) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
            && (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getErrorInfo() == null ? other.getErrorInfo() == null : this.getErrorInfo().equals(other.getErrorInfo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
        result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getErrorInfo() == null) ? 0 : getErrorInfo().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", mobile=").append(mobile);
        sb.append(", addTime=").append(addTime);
        sb.append(", code=").append(code);
        sb.append(", status=").append(status);
        sb.append(", type=").append(type);
        sb.append(", errorInfo=").append(errorInfo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}